/**
 * 
 */
package org.rollinitiative.d20.entity.races;

import java.util.ArrayList;

import javax.xml.bind.annotation.*;
import javax.xml.namespace.QName;

import org.rollinitiative.d20.encounter.combat.actions.ActionOptions;
import org.rollinitiative.d20.entity.Movement;
import org.rollinitiative.d20.entity.Size;

/**
 * @author bebopjmm
 * 
 */
@XmlRootElement(name = "Race", namespace = "java:org.rollinitiative.d20.entity")
@XmlType(name = "RaceType", namespace = "java:org.rollinitiative.d20.entity", propOrder = {
      "classification", "movement", "combatOptions", "advancement" })
public class Race
{

   private String name;

   private Size size;

   private QName id;

   private RacialClassification classification;

   private Movement movement;

   private CombatOptions combatOptions;

   private Advancement advancement;


   public Race()
   {
      this.name = "";
      this.id = new QName("default");
      this.movement = new Movement();
      this.classification = new RacialClassification();
      this.combatOptions = new CombatOptions();
   }


   public String getName()
   {
      return name;
   }


   @XmlAttribute(required = true)
   public void setName(String name)
   {
      this.name = name;
   }


   public Size getSize()
   {
      return size;
   }


   @XmlAttribute(required = true)
   public void setSize(Size size)
   {
      this.size = size;
   }


   public QName getId()
   {
      return id;
   }


   @XmlAttribute(required = true)
   public void setId(QName id)
   {
      this.id = id;
   }


   public RacialClassification getClassification()
   {
      return classification;
   }


   @XmlElement(name = "Classification", required = true)
   public void setClassification(RacialClassification classification)
   {
      this.classification = classification;
   }


   public Movement getMovement()
   {
      return movement;
   }


   @XmlElement(name = "Movement", required = true)
   public void setMovement(Movement movement)
   {
      this.movement = movement;
   }


   @XmlElement(name = "CombatOptions")
   public CombatOptions getCombatOptions()
   {
      return combatOptions;
   }


   public void setCombatOptions(CombatOptions combatOptions)
   {
      this.combatOptions = combatOptions;
   }


   /**
    * @return the advancement
    */
   public Advancement getAdvancement()
   {
      return advancement;
   }


   /**
    * @param advancement the advancement to set
    */
   @XmlElement(name = "Advancement", required = true)
   public void setAdvancement(Advancement advancement)
   {
      this.advancement = advancement;
   }

   @XmlType(name = "CombatOptionsType", namespace = "java:org.rollinitiative.d20.entity")
   public static class CombatOptions
   {
      private int reach;
      
      ActionOptions actionOptions;


      public int getReach()
      {
         return reach;
      }


      @XmlAttribute(name = "reach", required = true)
      public void setReach(int reach)
      {
         this.reach = reach;
      }


      /**
       * @return the actionOptions
       */
      public ActionOptions getActionOptions()
      {
         return actionOptions;
      }


      /**
       * @param actionOptions the actionOptions to set
       */
      @XmlElement(name = "ActionOptions")
      public void setActionOptions(ActionOptions actionOptions)
      {
         this.actionOptions = actionOptions;
      }

      
   }

   @XmlType(name = "RaceLevelListType", namespace = "java:org.rollinitiative.d20.entity")
   public static class Advancement
   {
      @XmlElement(name = "RacialLevel", required = true)
      public ArrayList<RacialLevel> levels = new ArrayList<RacialLevel>();
   }
}
